$OpenBSD: patch-src_libjasper_jpc_jpc_mqdec_c,v 1.1 2008/05/17 09:32:16 espie Exp $
--- src/libjasper/jpc/jpc_mqdec.c.orig	Fri May 16 21:00:25 2008
+++ src/libjasper/jpc/jpc_mqdec.c	Fri May 16 21:05:37 2008
@@ -118,7 +118,7 @@ jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_
 	mqdec->in = in;
 	mqdec->maxctxs = maxctxs;
 	/* Allocate memory for the per-context state information. */
-	if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) {
+	if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) {
 		goto error;
 	}
 	/* Set the current context to the first context. */
